Optimal. Leaf size=46 \[ \frac {b x^2}{6 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {b \log \left (1-c^2 x^2\right )}{6 c^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {6037, 272, 45}
\begin {gather*} \frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {b \log \left (1-c^2 x^2\right )}{6 c^3}+\frac {b x^2}{6 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 272
Rule 6037
Rubi steps
\begin {align*} \int x^2 \left (a+b \tanh ^{-1}(c x)\right ) \, dx &=\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right )-\frac {1}{3} (b c) \int \frac {x^3}{1-c^2 x^2} \, dx\\ &=\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right )-\frac {1}{6} (b c) \text {Subst}\left (\int \frac {x}{1-c^2 x} \, dx,x,x^2\right )\\ &=\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right )-\frac {1}{6} (b c) \text {Subst}\left (\int \left (-\frac {1}{c^2}-\frac {1}{c^2 \left (-1+c^2 x\right )}\right ) \, dx,x,x^2\right )\\ &=\frac {b x^2}{6 c}+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac {b \log \left (1-c^2 x^2\right )}{6 c^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 51, normalized size = 1.11 \begin {gather*} \frac {b x^2}{6 c}+\frac {a x^3}{3}+\frac {1}{3} b x^3 \tanh ^{-1}(c x)+\frac {b \log \left (1-c^2 x^2\right )}{6 c^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.01, size = 55, normalized size = 1.20
method | result | size |
derivativedivides | \(\frac {\frac {c^{3} x^{3} a}{3}+\frac {b \,c^{3} x^{3} \arctanh \left (c x \right )}{3}+\frac {b \,c^{2} x^{2}}{6}+\frac {b \ln \left (c x -1\right )}{6}+\frac {b \ln \left (c x +1\right )}{6}}{c^{3}}\) | \(55\) |
default | \(\frac {\frac {c^{3} x^{3} a}{3}+\frac {b \,c^{3} x^{3} \arctanh \left (c x \right )}{3}+\frac {b \,c^{2} x^{2}}{6}+\frac {b \ln \left (c x -1\right )}{6}+\frac {b \ln \left (c x +1\right )}{6}}{c^{3}}\) | \(55\) |
risch | \(\frac {x^{3} b \ln \left (c x +1\right )}{6}-\frac {x^{3} b \ln \left (-c x +1\right )}{6}+\frac {x^{3} a}{3}+\frac {b \,x^{2}}{6 c}+\frac {b \ln \left (c^{2} x^{2}-1\right )}{6 c^{3}}\) | \(58\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 44, normalized size = 0.96 \begin {gather*} \frac {1}{3} \, a x^{3} + \frac {1}{6} \, {\left (2 \, x^{3} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {x^{2}}{c^{2}} + \frac {\log \left (c^{2} x^{2} - 1\right )}{c^{4}}\right )}\right )} b \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 58, normalized size = 1.26 \begin {gather*} \frac {b c^{3} x^{3} \log \left (-\frac {c x + 1}{c x - 1}\right ) + 2 \, a c^{3} x^{3} + b c^{2} x^{2} + b \log \left (c^{2} x^{2} - 1\right )}{6 \, c^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.20, size = 58, normalized size = 1.26 \begin {gather*} \begin {cases} \frac {a x^{3}}{3} + \frac {b x^{3} \operatorname {atanh}{\left (c x \right )}}{3} + \frac {b x^{2}}{6 c} + \frac {b \log {\left (x - \frac {1}{c} \right )}}{3 c^{3}} + \frac {b \operatorname {atanh}{\left (c x \right )}}{3 c^{3}} & \text {for}\: c \neq 0 \\\frac {a x^{3}}{3} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 258 vs.
\(2 (40) = 80\).
time = 0.42, size = 258, normalized size = 5.61 \begin {gather*} \frac {1}{3} \, c {\left (\frac {{\left (\frac {3 \, {\left (c x + 1\right )}^{2} b}{{\left (c x - 1\right )}^{2}} + b\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{\frac {{\left (c x + 1\right )}^{3} c^{4}}{{\left (c x - 1\right )}^{3}} - \frac {3 \, {\left (c x + 1\right )}^{2} c^{4}}{{\left (c x - 1\right )}^{2}} + \frac {3 \, {\left (c x + 1\right )} c^{4}}{c x - 1} - c^{4}} + \frac {2 \, {\left (\frac {3 \, {\left (c x + 1\right )}^{2} a}{{\left (c x - 1\right )}^{2}} + a + \frac {{\left (c x + 1\right )}^{2} b}{{\left (c x - 1\right )}^{2}} - \frac {{\left (c x + 1\right )} b}{c x - 1}\right )}}{\frac {{\left (c x + 1\right )}^{3} c^{4}}{{\left (c x - 1\right )}^{3}} - \frac {3 \, {\left (c x + 1\right )}^{2} c^{4}}{{\left (c x - 1\right )}^{2}} + \frac {3 \, {\left (c x + 1\right )} c^{4}}{c x - 1} - c^{4}} - \frac {b \log \left (-\frac {c x + 1}{c x - 1} + 1\right )}{c^{4}} + \frac {b \log \left (-\frac {c x + 1}{c x - 1}\right )}{c^{4}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.74, size = 44, normalized size = 0.96 \begin {gather*} \frac {\frac {b\,\ln \left (c^2\,x^2-1\right )}{6}+\frac {b\,c^2\,x^2}{6}}{c^3}+\frac {a\,x^3}{3}+\frac {b\,x^3\,\mathrm {atanh}\left (c\,x\right )}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________